<template>
    <div class="van-icon-dom" @click="serach()">
        <van-icon :name="icon" />
    </div>
</template>

<script type="text/ecmascript-6">
import icon from "./top-search.png";
export default {
    data() {
        return {
            icon
        };
    },
    methods: {
        serach() {
            let query = this.$route.query;
            this.$router.push({ path: "search", query: query });
        }
    }
};
</script>

<style scoped lang="less">
.van-icon-dom {
    width: 0.8rem;
    height: 100%;
    font-size: 0.4rem;
}
</style>
